package at.ac.univie.zsu.aguataplan.ui.template;

import java.util.Date;
import java.util.List;

/**
 * Interface that is called by generic JPanel
 * 
 * @author gerry
 * 
 */
public interface IDialogListEntry {

	/**
	 * initialize list
	 * 
	 * @return
	 */
	public List<?> initText();

	/**
	 * initialize comboboxes
	 * 
	 * @return
	 */
	public List<List<?>> initCombo();

	/**
	 * initialize date panel
	 * 
	 * @return
	 */
	public List<Date> initDate();

	/**
	 * get object when select in list
	 * 
	 * @param obj
	 * @return
	 */
	public List<String> select(Object obj);

	/**
	 * get object when for combo when select in list
	 * 
	 * @param obj
	 * @return
	 */
	public List<Integer> selectCombo(Object obj);

	public List<Date> selectDate(Object obj);

	/**
	 * add new object to list
	 * 
	 * @param list
	 * @param combos
	 * @param dates
	 * @return
	 */
	public Object add(List<String> list, List<Object> combos, List<Date> dates);

	/**
	 * delete object from list
	 * 
	 * @param obj
	 * @return
	 */
	public Object delete(Object obj);

	/**
	 * update object in list
	 * 
	 * @param obj
	 * @param list
	 * @param combos
	 * @param dates
	 */
	public Object merge(Object obj, List<String> list, List<Object> combos, List<Date> dates);

}
